﻿using System;
using System.Collections.Generic; 

namespace NTTDATA.BEENChina.ResultCertification.Checker.Numeric
{
    class NumericComparer : IComparer<string>
    {
        
        public int Compare(string x, string y)
        {
            

            int comparResult = 0;
            int a, b; 
              

            int.TryParse(x, out a);
            int.TryParse(y, out b);

            comparResult = intCompare(a, b);

            return comparResult;

            
        }

        private int intCompare(int i1, int i2)
        {
            return i1 - i2;
        }

     
    }
}
